﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JSIF_WCFServer.Model;
using System.ServiceModel;

namespace JSIF_WCFServer.Server
{
    /// <summary>
    /// An implementation of the bookshelf manager interface
    /// </summary>
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, AddressFilterMode = AddressFilterMode.Any)]
    public class BookshelfManagerImpl : IBookshelfManager
    {
        /// <summary>
        /// Returns the source code and published files for the specified book packaged into an archive
        /// </summary>
        /// <param name="shortname">The server specific shortname of the book</param>
        /// <returns>the source code and published files for the specified book packaged into an archive</returns>
        public System.IO.Stream ExportStory(string shortname)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Imports a premade archive containing the source code (optional) and published files (required) and gives it the specified server specific shortname.  Can also import Z-Code files and Glux files.
        /// </summary>
        /// <remarks>
        /// This method can also be used to overwrite an existing book.  Once upload is complete you should make a second call to set the meta data.
        /// </remarks>
        /// <param name="shortname">The server specific shortname of the book</param>
        /// <param name="uploadedFile">An archive</param>
        /// <returns>true if the operation completed sucessfully</returns>
        public bool ImportStory(string shortname, System.IO.Stream uploadedFile)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Deletes the specified book from the bookshelf
        /// </summary>
        /// <param name="shortname">The server specific shortname of the book</param>
        /// <returns>true if the operation completed sucessfully</returns>
        public bool DeleteStory(string shortname)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Copies a whole book including history from shortnameA to shortnameB
        /// </summary>
        /// <remarks>
        /// This can also be used to overwrite the book at shortnameB
        /// </remarks>
        /// <param name="shortnameA">The source book</param>
        /// <param name="shortnameB">The destination book</param>
        /// <returns>true if the operation completed sucessfully</returns>
        public bool CopyStory(string shortnameA, string shortnameB)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Copies A to B, then deletes A
        /// </summary>
        /// <remarks>
        /// This can also be used to overwrite the book at shortnameB
        /// </remarks>
        /// <param name="shortnameA">The books original name</param>
        /// <param name="shortnameB">The books new name</param>
        /// <returns>true if the operation completed sucessfully</returns>
        public bool RenameStory(string shortnameA, string shortnameB)
        {
            throw new NotImplementedException();
        }

    }
}
